package cn.bctools.mail.entity.enums;


public enum HashAlgorithmEnum {

    MD5("MD5");


    private final String value;

    HashAlgorithmEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }

    public String toString() {
        return this.value;
    }


    public static HashAlgorithmEnum ofCode(String code) {
        for (HashAlgorithmEnum value : values()) {
            if (code.equals(value.getValue())) {
                return value;
            }
        }
        return null;
    }
}
